<?php
namespace app\model\customer;

use app\model\BaseModel;

/**
 * 客户线索机会模型
 * 对应数据库表: oa_customer_chance (客户线索机会表)
 */
class CustomerChance extends BaseModel
{
    // 设置表名（不包含前缀）
    protected $name = 'customer_chance';
    
    // 设置主键
    protected $pk = 'id';
    
    // 设置字段类型
    protected $type = [
        'customer_id' => 'integer',
        'primary_contact_id' => 'integer',
        'service_type_id' => 'integer',
        'stage' => 'integer',
        'expected_order_amount' => 'float',
        'admin_id' => 'integer',
        'belong_uid' => 'integer',
        'discovery_date' => 'integer',
        'expected_sign_date' => 'integer',
        'create_time' => 'integer',
        'update_time' => 'integer'
    ];

    // 可搜索字段
    protected $searchField = [
        'title',
        'customer_id',
        'primary_contact_id',
        'stage',
        'belong_uid'
    ];
}